<?php
//=============== 来源平台
if (!function_exists("get_platform"))
{
    function get_platform(int $platformTag) : array
    {
        $config = new \app\admin\model\SourceConfig();
        $res = $config->where('id',$platformTag)->find();
        $data = ['platform' => 'other','title' => '其它','source' => '其他',];
        if (!is_null($res))
        {
            $data = [
                'platform' => $res['platform'],
                'appid' => $res['appid'],
                'source' => $res['source'],
            ];
        }
        return $data;
    }
}
